Skip to content

Conversation

@samsonasik
Copy link
Member

Ref #617 (comment)

The indirect should be allowed to be kept, as #[Override] there is override non-empty method from parent of another class that extends PHPUnit\Framework\TestCase

RealTest -> SomeFunctionalTestCase -> PHPUnit\Framework\TestCase

which #[Override] is fine.

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @TomasVotruba , I add TestsNodeAnalyzer::isDirectlyExtendsTestCase() to cover this, so only remove #[Override] when directly extends PHPUnit test case.

@samsonasik
Copy link
Member Author

@TomasVotruba ready 👍

@TomasVotruba
Copy link
Member

Goal of this rule is different.
If there is a parent::setUp() call, it's obviously overrode. That's what this rule looks for

@samsonasik samsonasik deleted the skip-indirect branch January 27, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants